Skip to content

Conversation

@axi
Copy link
Contributor

@axi axi commented Nov 26, 2019

translation:extract on a new lang currently export keys with empty string as translation, resulting in empty string being valid translations.
I prefer to delete empty translations than having empty string, so fallback can be used

@odolbeau
Copy link
Member

Thanks @axi!
Nice move to create a new command to achieve this as it's not the behavior everyone expect.
For example, in my case I voluntary deal with empty translations to allow translators to add (or not) a translation in some places (like form help for example).

Anyway, before merging this PR, could you please add some tests? Thanks!

@rvanlaak
Copy link
Member

rvanlaak commented Nov 27, 2019

What about extracting the actual behavior of deleting empty messages to it's own class? That will make it testable, reusable and a bit more framework-independent. ;-)

Can imagine removing empty messages would become useful as feature to enable in development mode sometime.

@Nyholm
Copy link
Member

Nyholm commented Jan 6, 2020

A small ping. Could you rebase the PR?

@axi
Copy link
Contributor Author

axi commented Jan 9, 2020

Should be rebased now

@Nyholm
Copy link
Member

Nyholm commented Jan 18, 2020

What about extracting the actual behavior of deleting empty messages to it's own class?

That is true for most (all?) our commands. I see this command is just a copy of DeleteObsoleteCommand.

I think it is fair to merge this and leave the refactoring to a separate PR.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @axi.

Im just waiting for travis to be green.

@Nyholm Nyholm merged commit 6a0e645 into php-translation:master Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants